﻿@model Website.Models.Styling.TableViewHeaderItem

@if (this.Model.IsSortable)
{
    <a href="@Url.Action(this.Model.Action, new { Skip = 0, this.Model.Take, OrderBy = this.Model.SortableName, SortAscending = !this.Model.IsCurrentSortedByAsc })">
        @Model.Text
        @if (this.Model.IsCurrentSortedByAsc)
        {
            @Html.Raw("&#x25BC")
        }
        @if (this.Model.IsCurrentSortedByDesc)
        {
            @Html.Raw("&#x25B2")
        }
    </a>
}
else
{
    @Model.Text
}